-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
npm start - process.env.PORT support #117
Conversation
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks! |
Would love it if the host was configurable as well. |
@@ -77,7 +78,7 @@ compiler.plugin('done', function (stats) { | |||
if (!hasErrors && !hasWarnings) { | |||
console.log(chalk.green('Compiled successfully!')); | |||
console.log(); | |||
console.log('The app is running at http://localhost:3000/'); | |||
console.log('The app is running at http://localhost:'+PORT+'/'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the minimum requirement is Node 4 can't we use template strings for these?
Can you please describe your use case for customizing the port? Do you want to run two instances of the app? Do you have another tool at this port? |
Yes. I have an express app at port 3000 behind a nginx proxy. If the react app wants to run on 3000 i would have to modify the nginx conf and the express app. |
i think is just a matter of preference. i'm used to ExpressJS where you set env.PORT to whatever you like. |
Yep. We might revisit this later. |
run "PORT=3001 npm start" to start the app at port 3001